package gestion.horarios.model.jpa.entities;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the detalleplancurricular database table.
 * 
 */
@Embeddable
public class DetallePlanCurricularPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;
	private int planCurricularId;
	private int detallePlanCurricularId;

    public DetallePlanCurricularPK() {
    }

	@Column(unique=true, nullable=false)
	public int getPlanCurricularId() {
		return this.planCurricularId;
	}
	public void setPlanCurricularId(int planCurricularId) {
		this.planCurricularId = planCurricularId;
	}

	@Column(unique=true, nullable=false)
	public int getDetallePlanCurricularId() {
		return this.detallePlanCurricularId;
	}
	public void setDetallePlanCurricularId(int detallePlanCurricularId) {
		this.detallePlanCurricularId = detallePlanCurricularId;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof DetallePlanCurricularPK)) {
			return false;
		}
		DetallePlanCurricularPK castOther = (DetallePlanCurricularPK)other;
		return 
			(this.planCurricularId == castOther.planCurricularId)
			&& (this.detallePlanCurricularId == castOther.detallePlanCurricularId);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.planCurricularId;
		hash = hash * prime + this.detallePlanCurricularId;
		
		return hash;
    }
}